home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / usenet / sources / volume2 / languags / cdecl.3 < prev    next >
Text File  |  1988-11-05  |  45KB  |  1,412 lines

  1. Path: wucfua!wucs1!uunet!husc6!bbn!ulowell!page
  2. From: page@swan.ulowell.edu (Bob Page)
  3. Newsgroups: comp.sources.amiga
  4. Subject: v02i056:  cdecl - C & C++ declaration composer/decoder, Part03/03
  5. Message-ID: <10055@swan.ulowell.edu>
  6. Date: 4 Nov 88 23:11:47 GMT
  7. Organization: University of Lowell, Computer Science Dept.
  8. Lines: 1401
  9. Approved: page@swan.ulowell.edu
  10.  
  11. Submitted-by: finkel@taurus.bitnet (Udi Finkelstein)
  12. Posting-number: Volume 2, Issue 56
  13. Archive-name: languages/cdecl.3
  14.  
  15. #    This is a shell archive.
  16. #    Remove everything above and including the cut line.
  17. #    Then run the rest of the file through sh.
  18. #----cut here-----cut here-----cut here-----cut here----#
  19. #!/bin/sh
  20. # shar:    Shell Archiver
  21. #    Run the following text with /bin/sh to create:
  22. #    cdgram.old.c
  23. #    cdlex.l
  24. #    makefile
  25. #    makefile.old
  26. #    string.h
  27. #    testset
  28. #    testset++
  29. # This archive created: Fri Nov  4 18:02:06 1988
  30. cat << \SHAR_EOF > cdgram.old.c
  31.  
  32. # line 2 "cdgram.y"
  33. /* Yacc grammar for ANSI and C++ cdecl. */
  34. /* The output of this file is included */
  35. /* into the C file cdecl.c. */
  36. char cdgramsccsid[] = "@(#)cdgram.y    2.2 3/30/88";
  37.  
  38. # line 8 "cdgram.y"
  39. typedef union  {
  40.     char *dynstr;
  41.     struct {
  42.         char *left;
  43.         char *right;
  44.         char *type;
  45.     } halves;
  46. } YYSTYPE;
  47. # define ARRAY 257
  48. # define AS 258
  49. # define CAST 259
  50. # define COMMA 260
  51. # define DECLARE 261
  52. # define DOUBLECOLON 262
  53. # define EXPLAIN 263
  54. # define FUNCTION 264
  55. # define HELP 265
  56. # define INTO 266
  57. # define OF 267
  58. # define MEMBER 268
  59. # define POINTER 269
  60. # define REFERENCE 270
  61. # define RETURNING 271
  62. # define SET 272
  63. # define TO 273
  64. # define CHAR 274
  65. # define CLASS 275
  66. # define CONSTVOLATILE 276
  67. # define DOUBLE 277
  68. # define ENUM 278
  69. # define FLOAT 279
  70. # define INT 280
  71. # define LONG 281
  72. # define NAME 282
  73. # define NUMBER 283
  74. # define SHORT 284
  75. # define SIGNED 285
  76. # define STRUCT 286
  77. # define UNION 287
  78. # define UNSIGNED 288
  79. # define VOID 289
  80. # define AUTO 290
  81. # define EXTERN 291
  82. # define REGISTER 292
  83. # define STATIC 293
  84. #define yyclearin yychar = -1
  85. #define yyerrok yyerrflag = 0
  86. extern int yychar;
  87. extern short yyerrflag;
  88. #ifndef YYMAXDEPTH
  89. #define YYMAXDEPTH 150
  90. #endif
  91. YYSTYPE yylval, yyval;
  92. # define YYERRCODE 256
  93.  
  94. # line 855 "cdgram.y"
  95.  
  96. short yyexca[] ={
  97. -1, 1,
  98.     0, -1,
  99.     -2, 0,
  100. -1, 27,
  101.     282, 81,
  102.     40, 81,
  103.     42, 81,
  104.     38, 81,
  105.     -2, 87,
  106. -1, 37,
  107.     260, 31,
  108.     41, 31,
  109.     -2, 81,
  110. -1, 87,
  111.     282, 82,
  112.     40, 82,
  113.     42, 82,
  114.     38, 82,
  115.     -2, 80,
  116. -1, 92,
  117.     260, 31,
  118.     41, 31,
  119.     -2, 81,
  120.     };
  121. # define YYNPROD 89
  122. # define YYLAST 322
  123. short yyact[]={
  124.  
  125.   67,  79,  28,  69,  72,  68,  66,  76, 159,  13,
  126.   77,  75,  78,  73,  74,  70,  79,  16,  17,  18,
  127.   19,  16,  17,  18,  19,  67, 129,  78,  69, 103,
  128.   68,  66, 125,  25,  76,  39,  23,  77,  75, 128,
  129.   70,  74, 118,  22, 115, 137, 117, 118,  85, 115,
  130.   86, 117,  83,  23, 152,  25,  30, 100,  23,  10,
  131.   22,  56,  25,  23,  47,  22,  60,  59,  37,  97,
  132.   22, 121,  25,  40,  41, 123,  58,  25,  20,  34,
  133.  139, 110,  25, 161, 144,  93, 145,  92,  94,  32,
  134.   24,  57, 147,  71, 126,  29,  81,  21,  42,  55,
  135.    8, 136, 108, 150,  12, 135,  33, 106,  11, 114,
  136.   31,  10,  62, 151, 132, 134,  44,  45,  48,  49,
  137.  156,  43,  35,   2,  63,  15,  53,   1,  54,  14,
  138.   50,  64,  27,  65,  52, 101,  26,  46,  87,  82,
  139.   61,  38,   0,  90,  80,  88,   0,   0,  89,   0,
  140.   95,  96,  98, 108,  91, 108,   0,   0, 108,   0,
  141.   11,   0,  51,   0,   0,   0,   0,   0,   0,   0,
  142.    0,   0,   0,   0, 109,   0, 111, 104, 102,   0,
  143.    0,   0, 105, 112, 107,   0, 122,  99,   0, 113,
  144.    0, 119, 120,   0,   0,   0,   0, 127,   0,   0,
  145.    0,   0,   0,   0,   0, 124, 131,   0, 133,   0,
  146.    0,   0,   0, 142,   0,   0, 130, 143,   0,   0,
  147.    0,   0,   0,   0,   0, 138, 146, 140, 141, 148,
  148.    0, 149,   0,   0,   0,   0, 127,   0,   0,   0,
  149.  153,   0,   0,  25, 158,   0,   0, 127,   0, 128,
  150.  155, 160,  16,  17,  18,  19, 154,   0,   0,   0,
  151.    0, 157,   0,   0,   0,   0,   0,  25,   0,   0,
  152.    0,   0,   0, 128,   0,   0,   0,   0,   0,   0,
  153.    0,   0,   0,   0,   0,   0, 116,   0,   0,   0,
  154.    0, 116,  84,   0,   0,   0,   0,   0,   0,  36,
  155.    0,   0, 145, 145,  92,   9,   0,   0,   5,   0,
  156.    4,   0,   6,   0,   3,   0,   0,   0,   0,   0,
  157.    0,   7 };
  158. short yypact[]={
  159.  
  160. -1000,  49,-1000, 101,-273,-204, -38,-226,-1000, 101,
  161. -1000,-1000,-1000,-169,-194,-1000,-1000,-1000,-1000,-1000,
  162. -187, 101,  28,-248,-196,-214,-212,-214,-214, 101,
  163. -1000,-1000,-269, 101,-194,-1000,-194,-221,-191,-1000,
  164. -206,-207,-1000,-274,-1000,-1000,  10,-214,  10,-1000,
  165. -1000,-194,-1000, 101,-1000,  44,-170,-1000,-194,-199,
  166. -194,-1000,-249,-1000,-225,-247,-1000,-1000,-1000,-1000,
  167. -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,
  168.   10, 101,  67,-214,-181,-214,  10,-1000, 101,   9,
  169.  101,-1000,-221,-200,-194,-1000,-1000,-192,-1000,-1000,
  170. -1000,-1000,-1000,-1000, 101,-1000,  -9,-1000, -67,  10,
  171.   72,  10,  74,-1000,  64,   4,-182,   9,   9,-1000,
  172. -173,-194,-1000,-259,-1000,-1000,  43,-1000,-1000,-1000,
  173.   -1,-1000,  10,-1000,-1000,-226,-1000,-1000,  62,  71,
  174.   11,  11,-1000,-228,-1000,-243,   9,-1000,-1000, 101,
  175.   80,   9,-194,-174,  11,-1000, -33,  11,-1000,-1000,
  176.   42,-1000 };
  177. short yypgo[]={
  178.  
  179.    0,  99, 141, 140, 109,  94,  96, 139, 101, 137,
  180.   93, 112, 135, 133,  90,  95, 129, 125, 131, 124,
  181.   98,  91, 127, 123, 100, 121 };
  182. short yyr1[]={
  183.  
  184.    0,  22,  22,  23,  23,  23,  23,  23,  23,  23,
  185.   23,  23,  23,  23,  23,  24,  24,  15,  15,   6,
  186.    6,   6,   6,   7,   7,   7,   7,   7,   5,   5,
  187.    5,   1,   1,   1,   1,   1,   4,   4,   4,   4,
  188.    4,   4,   4,   4,   4,   8,   8,  21,  21,  21,
  189.   21,  21,  21,  21,   2,   2,  20,  25,   3,   3,
  190.    3,   3,  18,  18,  18,  10,  10,  19,  19,  19,
  191.   19,  19,  11,  11,  12,  12,  13,  13,  13,  13,
  192.   14,  14,   9,  17,  17,  17,  17,  16,  16 };
  193. short yyr2[]={
  194.  
  195.    0,   0,   2,   2,   6,   4,   5,   3,   6,   5,
  196.    5,   8,   3,   1,   2,   1,   1,   1,   0,   1,
  197.    3,   4,   3,   3,   4,   2,   3,   1,   3,   3,
  198.    1,   0,   3,   1,   1,   3,   0,   2,   5,   6,
  199.    3,   4,   2,   2,   2,   2,   3,   3,   6,   4,
  200.    4,   8,   4,   2,   0,   1,   2,   0,   1,   1,
  201.    2,   2,   1,   1,   1,   1,   1,   1,   1,   1,
  202.    1,   1,   2,   1,   1,   1,   1,   1,   1,   1,
  203.    2,   0,   2,   1,   1,   1,   1,   1,   0 };
  204. short yychk[]={
  205.  
  206. -1000, -22, -23, 265, 261, 259, 263, 272, -24, 256,
  207.   10,  59, -24, 282, -16, -17, 290, 291, 292, 293,
  208.  282, -21, 264, 257, -14, 276, -16, -17,  40, -15,
  209.  282, -24, 258, -21, 266, -24, 271,  40,  -2, 283,
  210.  269, 270, -20, -25, -14, -14,  -9, 276, -14, -14,
  211.  -24, -16, -24, -21, -21,  -1, 282, -21, 267, 273,
  212.  273,  -3, -11, -19, -18, -13, 280, 274, 279, 277,
  213.  289, -10, 278, 287, 288, 285, 281, 284, 286, 275,
  214.  -20,  -6,  -7,  42, 282,  38,  40, -14,  -6, -20,
  215.  -21, -24, 260,  41, 258, -21, -21, 268, -21, -19,
  216.  282, -12, -11, 276,  -6, -24,  40,  -8,  91, -14,
  217.  262, -14,  -6, -24,  -4,  40, 282,  42,  38, -24,
  218.   -1, 271, -21, 267, -24,  41,  -5, -14, 282,  93,
  219.  283,  -6,  42,  -6,  41,  41,  -8,  41,  -4, 262,
  220.   -4,  -4, -21, -10,  41, 260, -20,  93,  -6, -15,
  221.   41,  42, 282,  -5,  -4, -24,  40,  -4, -21,  41,
  222.   -5,  41 };
  223. short yydef[]={
  224.  
  225.    1,  -2,   2,   0,  88,  81,  88,  18,  13,   0,
  226.   15,  16,   3,   0,  81,  87,  83,  84,  85,  86,
  227.    0,   0,   0,  54,  57,  81,  81,  -2,  81,   0,
  228.   17,  14,  88,   0,  81,   7,  81,  -2,   0,  55,
  229.    0,   0,  53,   0,  80,  57,   0,  81,   0,  57,
  230.   12,  81,   5,   0,  47,   0,  33,  34,  81,  81,
  231.   81,  56,  58,  59,   0,  73,  67,  68,  69,  70,
  232.   71,  62,  63,  64,  76,  77,  78,  79,  65,  66,
  233.    0,   0,  19,  81,  27,  81,   0,  -2,   0,  36,
  234.    0,   6,  -2,   0,  81,  49,  50,   0,  52,  60,
  235.   61,  72,  74,  75,   0,  10,  81,  25,   0,   0,
  236.    0,   0,   0,   9,   0,  36,   0,  36,  36,   4,
  237.   32,  81,  35,   0,   8,  23,   0,  57,  30,  45,
  238.    0,  20,   0,  22,  26,  18,  44,  37,   0,   0,
  239.   42,  43,  48,   0,  24,  81,  36,  46,  21,   0,
  240.   40,  36,  81,  28,  29,  11,  81,  41,  51,  38,
  241.    0,  39 };
  242. #ifndef lint
  243. static    char yaccpar_sccsid[] = "@(#)yaccpar 1.2 86/07/18 SMI"; /* from UCB 4.1 83/02/11 */
  244. #endif
  245.  
  246. #
  247. # define YYFLAG -1000
  248. # define YYERROR goto yyerrlab
  249. # define YYACCEPT return(0)
  250. # define YYABORT return(1)
  251.  
  252. /*    parser for yacc output    */
  253.  
  254. #ifdef YYDEBUG
  255. int yydebug = 0; /* 1 for debugging */
  256. #endif
  257. YYSTYPE yyv[YYMAXDEPTH]; /* where the values are stored */
  258. int yychar = -1; /* current input token number */
  259. int yynerrs = 0;  /* number of errors */
  260. short yyerrflag = 0;  /* error recovery flag */
  261.  
  262. yyparse() {
  263.  
  264.     short yys[YYMAXDEPTH];
  265.     short yyj, yym;
  266.     register YYSTYPE *yypvt;
  267.     register short yystate, *yyps, yyn;
  268.     register YYSTYPE *yypv;
  269.     register short *yyxi;
  270.  
  271.     yystate = 0;
  272.     yychar = -1;
  273.     yynerrs = 0;
  274.     yyerrflag = 0;
  275.     yyps= &yys[-1];
  276.     yypv= &yyv[-1];
  277.  
  278.  yystack:    /* put a state and value onto the stack */
  279.  
  280. #ifdef YYDEBUG
  281.     if( yydebug  ) printf( "state %d, char 0%o\n", yystate, yychar );
  282. #endif
  283.         if( ++yyps>= &yys[YYMAXDEPTH] ) { yyerror( "yacc stack overflow" ); return(1); }
  284.         *yyps = yystate;
  285.         ++yypv;
  286.         *yypv = yyval;
  287.  
  288.  yynewstate:
  289.  
  290.     yyn = yypact[yystate];
  291.  
  292.     if( yyn<= YYFLAG ) goto yydefault; /* simple state */
  293.  
  294.     if( yychar<0 ) if( (yychar=yylex())<0 ) yychar=0;
  295.     if( (yyn += yychar)<0 || yyn >= YYLAST ) goto yydefault;
  296.  
  297.     if( yychk[ yyn=yyact[ yyn ] ] == yychar ){ /* valid shift */
  298.         yychar = -1;
  299.         yyval = yylval;
  300.         yystate = yyn;
  301.         if( yyerrflag > 0 ) --yyerrflag;
  302.         goto yystack;
  303.         }
  304.  
  305.  yydefault:
  306.     /* default state action */
  307.  
  308.     if( (yyn=yydef[yystate]) == -2 ) {
  309.         if( yychar<0 ) if( (yychar=yylex())<0 ) yychar = 0;
  310.         /* look through exception table */
  311.  
  312.         for( yyxi=yyexca; (*yyxi!= (-1)) || (yyxi[1]!=yystate) ; yyxi += 2 ) ; /* VOID */
  313.  
  314.         while( *(yyxi+=2) >= 0 ){
  315.             if( *yyxi == yychar ) break;
  316.             }
  317.         if( (yyn = yyxi[1]) < 0 ) return(0);   /* accept */
  318.         }
  319.  
  320.     if( yyn == 0 ){ /* error */
  321.         /* error ... attempt to resume parsing */
  322.  
  323.         switch( yyerrflag ){
  324.  
  325.         case 0:   /* brand new error */
  326.  
  327.             yyerror( "syntax error" );
  328.         yyerrlab:
  329.             ++yynerrs;
  330.  
  331.         case 1:
  332.         case 2: /* incompletely recovered error ... try again */
  333.  
  334.             yyerrflag = 3;
  335.  
  336.             /* find a state where "error" is a legal shift action */
  337.  
  338.             while ( yyps >= yys ) {
  339.                yyn = yypact[*yyps] + YYERRCODE;
  340.                if( yyn>= 0 && yyn < YYLAST && yychk[yyact[yyn]] == YYERRCODE ){
  341.                   yystate = yyact[yyn];  /* simulate a shift of "error" */
  342.                   goto yystack;
  343.                   }
  344.                yyn = yypact[*yyps];
  345.  
  346.                /* the current yyps has no shift onn "error", pop stack */
  347.  
  348. #ifdef YYDEBUG
  349.                if( yydebug ) printf( "error recovery pops state %d, uncovers %d\n", *yyps, yyps[-1] );
  350. #endif
  351.                --yyps;
  352.                --yypv;
  353.                }
  354.  
  355.             /* there is no state on the stack with an error shift ... abort */
  356.  
  357.     yyabort:
  358.             return(1);
  359.  
  360.  
  361.         case 3:  /* no shift yet; clobber input char */
  362.  
  363. #ifdef YYDEBUG
  364.             if( yydebug ) printf( "error recovery discards char %d\n", yychar );
  365. #endif
  366.  
  367.             if( yychar == 0 ) goto yyabort; /* don't discard EOF, quit */
  368.             yychar = -1;
  369.             goto yynewstate;   /* try again in the same state */
  370.  
  371.             }
  372.  
  373.         }
  374.  
  375.     /* reduction by production yyn */
  376.  
  377. #ifdef YYDEBUG
  378.         if( yydebug ) printf("reduce %d\n",yyn);
  379. #endif
  380.         yyps -= yyr2[yyn];
  381.         yypvt = yypv;
  382.         yypv -= yyr2[yyn];
  383.         yyval = yypv[1];
  384.         yym=yyn;
  385.             /* consult goto table to find next state */
  386.         yyn = yyr1[yyn];
  387.         yyj = yypgo[yyn] + *yyps + 1;
  388.         if( yyj>=YYLAST || yychk[ yystate = yyact[yyj] ] != -yyn ) yystate = yyact[yypgo[yyn]];
  389.         switch(yym){
  390.             
  391. case 2:
  392. # line 33 "cdgram.y"
  393. {
  394.             prompt();
  395.             prev = 0;
  396.             } break;
  397. case 3:
  398. # line 40 "cdgram.y"
  399. {
  400.             Debug((stderr, "stmt: help\n"));
  401.             dohelp();
  402.             } break;
  403. case 4:
  404. # line 46 "cdgram.y"
  405. {
  406.             Debug((stderr, "stmt: DECLARE NAME AS opt_storage adecl\n"));
  407.             Debug((stderr, "\tNAME='%s'\n", yypvt[-4].dynstr));
  408.             Debug((stderr, "\topt_storage='%s'\n", yypvt[-2].dynstr));
  409.             Debug((stderr, "\tacdecl.left='%s'\n", yypvt[-1].halves.left));
  410.             Debug((stderr, "\tacdecl.right='%s'\n", yypvt[-1].halves.right));
  411.             Debug((stderr, "\tacdecl.type='%s'\n", yypvt[-1].halves.type));
  412.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  413.             dodeclare(yypvt[-4].dynstr, yypvt[-2].dynstr, yypvt[-1].halves.left, yypvt[-1].halves.right, yypvt[-1].halves.type);
  414.             } break;
  415. case 5:
  416. # line 58 "cdgram.y"
  417. {
  418.             Debug((stderr, "stmt: DECLARE opt_storage adecl\n"));
  419.             Debug((stderr, "\topt_storage='%s'\n", yypvt[-2].dynstr));
  420.             Debug((stderr, "\tacdecl.left='%s'\n", yypvt[-1].halves.left));
  421.             Debug((stderr, "\tacdecl.right='%s'\n", yypvt[-1].halves.right));
  422.             Debug((stderr, "\tacdecl.type='%s'\n", yypvt[-1].halves.type));
  423.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  424.             dodeclare(NullCP, yypvt[-2].dynstr, yypvt[-1].halves.left, yypvt[-1].halves.right, yypvt[-1].halves.type);
  425.             } break;
  426. case 6:
  427. # line 69 "cdgram.y"
  428. {
  429.             Debug((stderr, "stmt: CAST NAME AS adecl\n"));
  430.             Debug((stderr, "\tNAME='%s'\n", yypvt[-3].dynstr));
  431.             Debug((stderr, "\tacdecl.left='%s'\n", yypvt[-1].halves.left));
  432.             Debug((stderr, "\tacdecl.right='%s'\n", yypvt[-1].halves.right));
  433.             Debug((stderr, "\tacdecl.type='%s'\n", yypvt[-1].halves.type));
  434.             docast(yypvt[-3].dynstr, yypvt[-1].halves.left, yypvt[-1].halves.right, yypvt[-1].halves.type);
  435.             } break;
  436. case 7:
  437. # line 79 "cdgram.y"
  438. {
  439.             Debug((stderr, "stmt: CAST adecl\n"));
  440.             Debug((stderr, "\tacdecl.left='%s'\n", yypvt[-1].halves.left));
  441.             Debug((stderr, "\tacdecl.right='%s'\n", yypvt[-1].halves.right));
  442.             Debug((stderr, "\tacdecl.type='%s'\n", yypvt[-1].halves.type));
  443.             docast(NullCP, yypvt[-1].halves.left, yypvt[-1].halves.right, yypvt[-1].halves.type);
  444.             } break;
  445. case 8:
  446. # line 88 "cdgram.y"
  447. {
  448.             Debug((stderr, "stmt: EXPLAIN opt_storage opt_constvol_list type cdecl\n"));
  449.             Debug((stderr, "\topt_storage='%s'\n", yypvt[-4].dynstr));
  450.             Debug((stderr, "\topt_constvol_list='%s'\n", yypvt[-3].dynstr));
  451.             Debug((stderr, "\ttype='%s'\n", yypvt[-2].dynstr));
  452.             Debug((stderr, "\tcdecl='%s'\n", yypvt[-1].dynstr));
  453.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  454.             dodexplain(yypvt[-4].dynstr, yypvt[-3].dynstr, yypvt[-2].dynstr, yypvt[-1].dynstr);
  455.             } break;
  456. case 9:
  457. # line 99 "cdgram.y"
  458. {
  459.             Debug((stderr, "stmt: EXPLAIN storage opt_constvol_list cdecl\n"));
  460.             Debug((stderr, "\tstorage='%s'\n", yypvt[-3].dynstr));
  461.             Debug((stderr, "\topt_constvol_list='%s'\n", yypvt[-2].dynstr));
  462.             Debug((stderr, "\tcdecl='%s'\n", yypvt[-1].dynstr));
  463.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  464.             dodexplain(yypvt[-3].dynstr, yypvt[-2].dynstr, NullCP, yypvt[-1].dynstr);
  465.             } break;
  466. case 10:
  467. # line 109 "cdgram.y"
  468. {
  469.             Debug((stderr, "stmt: EXPLAIN opt_storage constvol_list cdecl\n"));
  470.             Debug((stderr, "\topt_storage='%s'\n", yypvt[-3].dynstr));
  471.             Debug((stderr, "\tconstvol_list='%s'\n", yypvt[-2].dynstr));
  472.             Debug((stderr, "\tcdecl='%s'\n", yypvt[-1].dynstr));
  473.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  474.             dodexplain(yypvt[-3].dynstr, yypvt[-2].dynstr, NullCP, yypvt[-1].dynstr);
  475.             } break;
  476. case 11:
  477. # line 119 "cdgram.y"
  478. {
  479.             Debug((stderr, "stmt: EXPLAIN ( opt_constvol_list type cast ) optNAME\n"));
  480.             Debug((stderr, "\topt_constvol_list='%s'\n", yypvt[-5].dynstr));
  481.             Debug((stderr, "\ttype='%s'\n", yypvt[-4].dynstr));
  482.             Debug((stderr, "\tcast='%s'\n", yypvt[-3].dynstr));
  483.             Debug((stderr, "\tNAME='%s'\n", yypvt[-1].dynstr));
  484.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  485.             docexplain(yypvt[-5].dynstr, yypvt[-4].dynstr, yypvt[-3].dynstr, yypvt[-1].dynstr);
  486.             } break;
  487. case 12:
  488. # line 130 "cdgram.y"
  489. {
  490.             Debug((stderr, "stmt: SET optNAME\n"));
  491.             Debug((stderr, "\toptNAME='%s'\n", yypvt[-1].dynstr));
  492.             doset(yypvt[-1].dynstr);
  493.             } break;
  494. case 14:
  495. # line 138 "cdgram.y"
  496. {
  497.             yyerrok;
  498.             } break;
  499. case 15:
  500. # line 144 "cdgram.y"
  501. {
  502.             doprompt();
  503.             } break;
  504. case 16:
  505. # line 148 "cdgram.y"
  506. {
  507.             noprompt();
  508.             } break;
  509. case 17:
  510. # line 154 "cdgram.y"
  511. {
  512.             Debug((stderr, "optNAME: NAME\n"));
  513.             Debug((stderr, "\tNAME='%s'\n", yypvt[-0].dynstr));
  514.             yyval.dynstr = yypvt[-0].dynstr;
  515.             } break;
  516. case 18:
  517. # line 161 "cdgram.y"
  518. {
  519.             Debug((stderr, "optNAME: EMPTY\n"));
  520.             yyval.dynstr = ds(unknown_name);
  521.             } break;
  522. case 20:
  523. # line 169 "cdgram.y"
  524. {
  525.             Debug((stderr, "cdecl: * opt_constvol_list cdecl\n"));
  526.             Debug((stderr, "\topt_constvol_list='%s'\n", yypvt[-1].dynstr));
  527.             Debug((stderr, "\tcdecl='%s'\n", yypvt[-0].dynstr));
  528.             yyval.dynstr = cat(yypvt[-0].dynstr,yypvt[-1].dynstr,ds(strlen(yypvt[-1].dynstr)?" pointer to ":"pointer to "),NullCP);
  529.             prev = 'p';
  530.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  531.             } break;
  532. case 21:
  533. # line 179 "cdgram.y"
  534. {
  535.             Debug((stderr, "cdecl: NAME DOUBLECOLON '*' cdecl\n"));
  536.             Debug((stderr, "\tNAME='%s'\n", yypvt[-3].dynstr));
  537.             Debug((stderr, "\tcdecl='%s'\n", yypvt[-0].dynstr));
  538.             if (!CplusplusFlag)
  539.                 unsupp("pointer to member of class", NullCP);
  540.             yyval.dynstr = cat(yypvt[-0].dynstr,ds("pointer to member of class "),yypvt[-3].dynstr,ds(" "),NullCP);
  541.             prev = 'p';
  542.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  543.             } break;
  544. case 22:
  545. # line 191 "cdgram.y"
  546. {
  547.             Debug((stderr, "cdecl: & opt_constvol_list cdecl\n"));
  548.             Debug((stderr, "\topt_constvol_list='%s'\n", yypvt[-1].dynstr));
  549.             Debug((stderr, "\tcdecl='%s'\n", yypvt[-0].dynstr));
  550.             if (!CplusplusFlag)
  551.                 unsupp("reference", NullCP);
  552.             yyval.dynstr = cat(yypvt[-0].dynstr,yypvt[-1].dynstr,ds(strlen(yypvt[-1].dynstr)?" reference to ":"reference to "),NullCP);
  553.             prev = 'r';
  554.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  555.             } break;
  556. case 23:
  557. # line 204 "cdgram.y"
  558. {
  559.             Debug((stderr, "cdecl1: cdecl1()\n"));
  560.             Debug((stderr, "\tcdecl1='%s'\n", yypvt[-2].dynstr));
  561.             yyval.dynstr = cat(yypvt[-2].dynstr,ds("function returning "),NullCP);
  562.             prev = 'f';
  563.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  564.             } break;
  565. case 24:
  566. # line 213 "cdgram.y"
  567. {
  568.             Debug((stderr, "cdecl1: cdecl1(castlist)\n"));
  569.             Debug((stderr, "\tcdecl1='%s'\n", yypvt[-3].dynstr));
  570.             Debug((stderr, "\tcastlist='%s'\n", yypvt[-1].dynstr));
  571.             yyval.dynstr = cat(yypvt[-3].dynstr, ds("function ("),
  572.                   yypvt[-1].dynstr, ds(") returning "), NullCP);
  573.             prev = 'f';
  574.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  575.             } break;
  576. case 25:
  577. # line 224 "cdgram.y"
  578. {
  579.             Debug((stderr, "cdecl1: cdecl1 cdims\n"));
  580.             Debug((stderr, "\tcdecl1='%s'\n", yypvt[-1].dynstr));
  581.             Debug((stderr, "\tcdims='%s'\n", yypvt[-0].dynstr));
  582.             yyval.dynstr = cat(yypvt[-1].dynstr,ds("array "),yypvt[-0].dynstr,NullCP);
  583.             prev = 'a';
  584.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  585.             } break;
  586. case 26:
  587. # line 234 "cdgram.y"
  588. {
  589.             Debug((stderr, "cdecl1: (cdecl)\n"));
  590.             Debug((stderr, "\tcdecl='%s'\n", yypvt[-1].dynstr));
  591.             yyval.dynstr = yypvt[-1].dynstr;
  592.             /* prev = prev; */
  593.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  594.             } break;
  595. case 27:
  596. # line 243 "cdgram.y"
  597. {
  598.             Debug((stderr, "cdecl1: NAME\n"));
  599.             Debug((stderr, "\tNAME='%s'\n", yypvt[-0].dynstr));
  600.             savedname = yypvt[-0].dynstr;
  601.             yyval.dynstr = ds("");
  602.             prev = 'n';
  603.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  604.             } break;
  605. case 28:
  606. # line 254 "cdgram.y"
  607. {
  608.             Debug((stderr, "castlist: castlist1, castlist2\n"));
  609.             Debug((stderr, "\tcastlist1='%s'\n", yypvt[-2].dynstr));
  610.             Debug((stderr, "\tcastlist2='%s'\n", yypvt[-0].dynstr));
  611.             yyval.dynstr = cat(yypvt[-2].dynstr, ds(", "), yypvt[-0].dynstr, NullCP);
  612.             } break;
  613. case 29:
  614. # line 262 "cdgram.y"
  615. {
  616.             Debug((stderr, "castlist: opt_constvol_list type cast\n"));
  617.             Debug((stderr, "\topt_constvol_list='%s'\n", yypvt[-2].dynstr));
  618.             Debug((stderr, "\ttype='%s'\n", yypvt[-1].dynstr));
  619.             Debug((stderr, "\tcast='%s'\n", yypvt[-0].dynstr));
  620.             yyval.dynstr = cat(yypvt[-0].dynstr, yypvt[-2].dynstr, ds(strlen(yypvt[-2].dynstr) ? " " : ""), yypvt[-1].dynstr, NullCP);
  621.             } break;
  622. case 30:
  623. # line 271 "cdgram.y"
  624. {
  625.             yyval.dynstr = yypvt[-0].dynstr;
  626.             } break;
  627. case 31:
  628. # line 277 "cdgram.y"
  629. {
  630.             Debug((stderr, "adecllist: EMPTY\n"));
  631.             yyval.dynstr = ds("");
  632.             } break;
  633. case 32:
  634. # line 283 "cdgram.y"
  635. {
  636.             Debug((stderr, "adecllist: adecllist1, adecllist2\n"));
  637.             Debug((stderr, "\tadecllist1='%s'\n", yypvt[-2].dynstr));
  638.             Debug((stderr, "\tadecllist2='%s'\n", yypvt[-0].dynstr));
  639.             yyval.dynstr = cat(yypvt[-2].dynstr, ds(", "), yypvt[-0].dynstr, NullCP);
  640.             } break;
  641. case 33:
  642. # line 291 "cdgram.y"
  643. {
  644.             Debug((stderr, "adecllist: NAME\n"));
  645.             Debug((stderr, "\tNAME='%s'\n", yypvt[-0].dynstr));
  646.             yyval.dynstr = yypvt[-0].dynstr;
  647.             } break;
  648. case 34:
  649. # line 298 "cdgram.y"
  650. {
  651.             Debug((stderr, "adecllist: adecl\n"));
  652.             Debug((stderr, "\tadecl.left='%s'\n", yypvt[-0].halves.left));
  653.             Debug((stderr, "\tadecl.right='%s'\n", yypvt[-0].halves.right));
  654.             Debug((stderr, "\tadecl.type='%s'\n", yypvt[-0].halves.type));
  655.             yyval.dynstr = cat(yypvt[-0].halves.type, ds(" "), yypvt[-0].halves.left, yypvt[-0].halves.right, NullCP);
  656.             } break;
  657. case 35:
  658. # line 307 "cdgram.y"
  659. {
  660.             Debug((stderr, "adecllist: NAME AS adecl\n"));
  661.             Debug((stderr, "\tNAME='%s'\n", yypvt[-2].dynstr));
  662.             Debug((stderr, "\tadecl.left='%s'\n", yypvt[-0].halves.left));
  663.             Debug((stderr, "\tadecl.right='%s'\n", yypvt[-0].halves.right));
  664.             Debug((stderr, "\tadecl.type='%s'\n", yypvt[-0].halves.type));
  665.             yyval.dynstr = cat(yypvt[-0].halves.type, ds(" "), yypvt[-0].halves.left, yypvt[-2].dynstr, yypvt[-0].halves.right, NullCP);
  666.             } break;
  667. case 36:
  668. # line 318 "cdgram.y"
  669. {
  670.             Debug((stderr, "cast: EMPTY\n"));
  671.             yyval.dynstr = ds("");
  672.             /* prev = prev; */
  673.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  674.             } break;
  675. case 37:
  676. # line 326 "cdgram.y"
  677. {
  678.             Debug((stderr, "cast: ()\n"));
  679.             yyval.dynstr = ds("function returning ");
  680.             prev = 'f';
  681.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  682.             } break;
  683. case 38:
  684. # line 334 "cdgram.y"
  685. {
  686.             Debug((stderr, "cast: (cast)()\n"));
  687.             Debug((stderr, "\tcast='%s'\n", yypvt[-3].dynstr));
  688.             yyval.dynstr = cat(yypvt[-3].dynstr,ds("function returning "),NullCP);
  689.             prev = 'f';
  690.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  691.             } break;
  692. case 39:
  693. # line 343 "cdgram.y"
  694. {
  695.             Debug((stderr, "cast: (cast)(castlist)\n"));
  696.             Debug((stderr, "\tcast='%s'\n", yypvt[-4].dynstr));
  697.             Debug((stderr, "\tcastlist='%s'\n", yypvt[-1].dynstr));
  698.             yyval.dynstr = cat(yypvt[-4].dynstr,ds("function ("),yypvt[-1].dynstr,ds(") returning "),NullCP);
  699.             prev = 'f';
  700.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  701.             } break;
  702. case 40:
  703. # line 353 "cdgram.y"
  704. {
  705.             Debug((stderr, "cast: (cast)\n"));
  706.             Debug((stderr, "\tcast='%s'\n", yypvt[-1].dynstr));
  707.             yyval.dynstr = yypvt[-1].dynstr;
  708.             /* prev = prev; */
  709.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  710.             } break;
  711. case 41:
  712. # line 362 "cdgram.y"
  713. {
  714.             Debug((stderr, "cast: NAME::*cast\n"));
  715.             Debug((stderr, "\tcast='%s'\n", yypvt[-0].dynstr));
  716.             if (!CplusplusFlag)
  717.                 unsupp("pointer to member of class", NullCP);
  718.             yyval.dynstr = cat(yypvt[-0].dynstr,ds("pointer to member of class "),yypvt[-3].dynstr,ds(" "),NullCP);
  719.             prev = 'p';
  720.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  721.             } break;
  722. case 42:
  723. # line 373 "cdgram.y"
  724. {
  725.             Debug((stderr, "cast: *cast\n"));
  726.             Debug((stderr, "\tcast='%s'\n", yypvt[-0].dynstr));
  727.             yyval.dynstr = cat(yypvt[-0].dynstr,ds("pointer to "),NullCP);
  728.             prev = 'p';
  729.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  730.             } break;
  731. case 43:
  732. # line 382 "cdgram.y"
  733. {
  734.             Debug((stderr, "cast: &cast\n"));
  735.             Debug((stderr, "\tcast='%s'\n", yypvt[-0].dynstr));
  736.             if (!CplusplusFlag)
  737.                 unsupp("reference", NullCP);
  738.             yyval.dynstr = cat(yypvt[-0].dynstr,ds("reference to "),NullCP);
  739.             prev = 'r';
  740.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  741.             } break;
  742. case 44:
  743. # line 393 "cdgram.y"
  744. {
  745.             Debug((stderr, "cast: cast cdims\n"));
  746.             Debug((stderr, "\tcast='%s'\n", yypvt[-1].dynstr));
  747.             Debug((stderr, "\tcdims='%s'\n", yypvt[-0].dynstr));
  748.             yyval.dynstr = cat(yypvt[-1].dynstr,ds("array "),yypvt[-0].dynstr,NullCP);
  749.             prev = 'a';
  750.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  751.             } break;
  752. case 45:
  753. # line 404 "cdgram.y"
  754. {
  755.             Debug((stderr, "cdims: []\n"));
  756.             yyval.dynstr = ds("of ");
  757.             } break;
  758. case 46:
  759. # line 410 "cdgram.y"
  760. {
  761.             Debug((stderr, "cdims: [NUMBER]\n"));
  762.             Debug((stderr, "\tNUMBER='%s'\n", yypvt[-1].dynstr));
  763.             yyval.dynstr = cat(yypvt[-1].dynstr,ds(" of "),NullCP);
  764.             } break;
  765. case 47:
  766. # line 418 "cdgram.y"
  767. {
  768.             Debug((stderr, "adecl: FUNCTION RETURNING adecl\n"));
  769.             Debug((stderr, "\tadecl.left='%s'\n", yypvt[-0].halves.left));
  770.             Debug((stderr, "\tadecl.right='%s'\n", yypvt[-0].halves.right));
  771.             Debug((stderr, "\tadecl.type='%s'\n", yypvt[-0].halves.type));
  772.             if (prev == 'f')
  773.                 unsupp("Function returning function",
  774.                        "function returning pointer to function");
  775.             else if (prev=='A' || prev=='a')
  776.                 unsupp("Function returning array",
  777.                        "function returning pointer");
  778.             yyval.halves.left = yypvt[-0].halves.left;
  779.             yyval.halves.right = cat(ds("()"),yypvt[-0].halves.right,NullCP);
  780.             yyval.halves.type = yypvt[-0].halves.type;
  781.             prev = 'f';
  782.             Debug((stderr, "\n\tadecl now =\n"));
  783.             Debug((stderr, "\t\tadecl.left='%s'\n", yyval.halves.left));
  784.             Debug((stderr, "\t\tadecl.right='%s'\n", yyval.halves.right));
  785.             Debug((stderr, "\t\tadecl.type='%s'\n", yyval.halves.type));
  786.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  787.             } break;
  788. case 48:
  789. # line 441 "cdgram.y"
  790. {
  791.             Debug((stderr, "adecl: FUNCTION (adecllist) RETURNING adecl\n"));
  792.             Debug((stderr, "\tadecllist='%s'\n", yypvt[-3].dynstr));
  793.             Debug((stderr, "\tadecl.left='%s'\n", yypvt[-0].halves.left));
  794.             Debug((stderr, "\tadecl.right='%s'\n", yypvt[-0].halves.right));
  795.             Debug((stderr, "\tadecl.type='%s'\n", yypvt[-0].halves.type));
  796.             if (prev == 'f')
  797.                 unsupp("Function returning function",
  798.                        "function returning pointer to function");
  799.             else if (prev=='A' || prev=='a')
  800.                 unsupp("Function returning array",
  801.                        "function returning pointer");
  802.             yyval.halves.left = yypvt[-0].halves.left;
  803.             yyval.halves.right = cat(ds("("),yypvt[-3].dynstr,ds(")"),yypvt[-0].halves.right,NullCP);
  804.             yyval.halves.type = yypvt[-0].halves.type;
  805.             prev = 'f';
  806.             Debug((stderr, "\n\tadecl now =\n"));
  807.             Debug((stderr, "\t\tadecl.left='%s'\n", yyval.halves.left));
  808.             Debug((stderr, "\t\tadecl.right='%s'\n", yyval.halves.right));
  809.             Debug((stderr, "\t\tadecl.type='%s'\n", yyval.halves.type));
  810.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  811.             } break;
  812. case 49:
  813. # line 465 "cdgram.y"
  814. {
  815.             Debug((stderr, "adecl: ARRAY adims OF adecl\n"));
  816.             Debug((stderr, "\tadims='%s'\n", yypvt[-2].dynstr));
  817.             Debug((stderr, "\tadecl.left='%s'\n", yypvt[-0].halves.left));
  818.             Debug((stderr, "\tadecl.right='%s'\n", yypvt[-0].halves.right));
  819.             Debug((stderr, "\tadecl.type='%s'\n", yypvt[-0].halves.type));
  820.             if (prev == 'f')
  821.                 unsupp("Array of function",
  822.                        "array of pointer to function");
  823.             else if (prev == 'a')
  824.                 unsupp("Inner array of unspecified size",
  825.                        "array of pointer");
  826.             else if (prev == 'v')
  827.                 unsupp("Array of void",
  828.                        "pointer to void");
  829.             if (arbdims)
  830.                 prev = 'a';
  831.             else
  832.                 prev = 'A';
  833.             yyval.halves.left = yypvt[-0].halves.left;
  834.             yyval.halves.right = cat(yypvt[-2].dynstr,yypvt[-0].halves.right,NullCP);
  835.             yyval.halves.type = yypvt[-0].halves.type;
  836.             Debug((stderr, "\n\tadecl now =\n"));
  837.             Debug((stderr, "\t\tadecl.left='%s'\n", yyval.halves.left));
  838.             Debug((stderr, "\t\tadecl.right='%s'\n", yyval.halves.right));
  839.             Debug((stderr, "\t\tadecl.type='%s'\n", yyval.halves.type));
  840.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  841.             } break;
  842. case 50:
  843. # line 495 "cdgram.y"
  844. {
  845.             char *op = "", *cp = "", *sp = "";
  846.  
  847.             Debug((stderr, "adecl: opt_constvol_list POINTER TO adecl\n"));
  848.             Debug((stderr, "\topt_constvol_list='%s'\n", yypvt[-3].dynstr));
  849.             Debug((stderr, "\tadecl.left='%s'\n", yypvt[-0].halves.left));
  850.             Debug((stderr, "\tadecl.right='%s'\n", yypvt[-0].halves.right));
  851.             Debug((stderr, "\tadecl.type='%s'\n", yypvt[-0].halves.type));
  852.             if (prev == 'a')
  853.                 unsupp("Pointer to array of unspecified dimension",
  854.                        "pointer to object");
  855.             if (prev=='a' || prev=='A' || prev=='f') {
  856.                 op = "(";
  857.                 cp = ")";
  858.             }
  859.             if (strlen(yypvt[-3].dynstr) != 0)
  860.                 sp = " ";
  861.             yyval.halves.left = cat(yypvt[-0].halves.left,ds(op),ds("*"),
  862.                        ds(sp),yypvt[-3].dynstr,ds(sp),NullCP);
  863.             yyval.halves.right = cat(ds(cp),yypvt[-0].halves.right,NullCP);
  864.             yyval.halves.type = yypvt[-0].halves.type;
  865.             prev = 'p';
  866.             Debug((stderr, "\n\tadecl now =\n"));
  867.             Debug((stderr, "\t\tadecl.left='%s'\n", yyval.halves.left));
  868.             Debug((stderr, "\t\tadecl.right='%s'\n", yyval.halves.right));
  869.             Debug((stderr, "\t\tadecl.type='%s'\n", yyval.halves.type));
  870.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  871.             } break;
  872. case 51:
  873. # line 525 "cdgram.y"
  874. {
  875.             char *op = "", *cp = "", *sp = "";
  876.  
  877.             Debug((stderr, "adecl: opt_constvol_list POINTER TO MEMBER OF ClassStruct NAME adecl\n"));
  878.             Debug((stderr, "\topt_constvol_list='%s'\n", yypvt[-7].dynstr));
  879.             Debug((stderr, "\tClassStruct='%s'\n", yypvt[-2].dynstr));
  880.             Debug((stderr, "\tNAME='%s'\n", yypvt[-1].dynstr));
  881.             Debug((stderr, "\tadecl.left='%s'\n", yypvt[-0].halves.left));
  882.             Debug((stderr, "\tadecl.right='%s'\n", yypvt[-0].halves.right));
  883.             Debug((stderr, "\tadecl.type='%s'\n", yypvt[-0].halves.type));
  884.             if (!CplusplusFlag)
  885.                 unsupp("pointer to member of class", NullCP);
  886.             if (prev == 'a')
  887.                 unsupp("Pointer to array of unspecified dimension",
  888.                        "pointer to object");
  889.             if (prev=='a' || prev=='A' || prev=='f') {
  890.                 op = "(";
  891.                 cp = ")";
  892.             }
  893.             if (strlen(yypvt[-7].dynstr) != 0)
  894.                 sp = " ";
  895.             yyval.halves.left = cat(yypvt[-0].halves.left,ds(op),yypvt[-1].dynstr,ds("::*"),
  896.                       ds(sp),yypvt[-7].dynstr,ds(sp),NullCP);
  897.             yyval.halves.right = cat(ds(cp),yypvt[-0].halves.right,NullCP);
  898.             yyval.halves.type = yypvt[-0].halves.type;
  899.             prev = 'p';
  900.             Debug((stderr, "\n\tadecl now =\n"));
  901.             Debug((stderr, "\t\tadecl.left='%s'\n", yyval.halves.left));
  902.             Debug((stderr, "\t\tadecl.right='%s'\n", yyval.halves.right));
  903.             Debug((stderr, "\t\tadecl.type='%s'\n", yyval.halves.type));
  904.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  905.             } break;
  906. case 52:
  907. # line 559 "cdgram.y"
  908. {
  909.             char *op = "", *cp = "", *sp = "";
  910.  
  911.             Debug((stderr, "adecl: opt_constvol_list REFERENCE TO adecl\n"));
  912.             Debug((stderr, "\topt_constvol_list='%s'\n", yypvt[-3].dynstr));
  913.             Debug((stderr, "\tadecl.left='%s'\n", yypvt[-0].halves.left));
  914.             Debug((stderr, "\tadecl.right='%s'\n", yypvt[-0].halves.right));
  915.             Debug((stderr, "\tadecl.type='%s'\n", yypvt[-0].halves.type));
  916.             if (!CplusplusFlag)
  917.                 unsupp("reference", NullCP);
  918.             if (prev == 'v')
  919.                 unsupp("Reference to void",
  920.                        "pointer to void");
  921.             else if (prev == 'a')
  922.                 unsupp("Reference to array of unspecified dimension",
  923.                        "reference to object");
  924.             if (prev=='a' || prev=='A' || prev=='f') {
  925.                 op = "(";
  926.                 cp = ")";
  927.             }
  928.             if (strlen(yypvt[-3].dynstr) != 0)
  929.                 sp = " ";
  930.             yyval.halves.left = cat(yypvt[-0].halves.left,ds(op),ds("&"),
  931.                        ds(sp),yypvt[-3].dynstr,ds(sp),NullCP);
  932.             yyval.halves.right = cat(ds(cp),yypvt[-0].halves.right,NullCP);
  933.             yyval.halves.type = yypvt[-0].halves.type;
  934.             prev = 'r';
  935.             Debug((stderr, "\n\tadecl now =\n"));
  936.             Debug((stderr, "\t\tadecl.left='%s'\n", yyval.halves.left));
  937.             Debug((stderr, "\t\tadecl.right='%s'\n", yyval.halves.right));
  938.             Debug((stderr, "\t\tadecl.type='%s'\n", yyval.halves.type));
  939.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  940.             } break;
  941. case 53:
  942. # line 594 "cdgram.y"
  943. {
  944.             Debug((stderr, "adecl: opt_constvol_list type\n"));
  945.             Debug((stderr, "\topt_constvol_list='%s'\n", yypvt[-1].dynstr));
  946.             Debug((stderr, "\ttype='%s'\n", yypvt[-0].dynstr));
  947.             yyval.halves.left = ds("");
  948.             yyval.halves.right = ds("");
  949.             yyval.halves.type = cat(yypvt[-1].dynstr,ds(strlen(yypvt[-1].dynstr)?" ":""),yypvt[-0].dynstr,NullCP);
  950.             if (strcmp(yypvt[-0].dynstr, "void") == 0)
  951.                 prev = 'v';
  952.             else if ((strncmp(yypvt[-0].dynstr, "struct", 6) == 0) ||
  953.                      (strncmp(yypvt[-0].dynstr, "class", 5) == 0))
  954.                 prev = 's';
  955.             else
  956.                 prev = 't';
  957.             Debug((stderr, "\n\tadecl now =\n"));
  958.             Debug((stderr, "\t\tadecl.left='%s'\n", yyval.halves.left));
  959.             Debug((stderr, "\t\tadecl.right='%s'\n", yyval.halves.right));
  960.             Debug((stderr, "\t\tadecl.type='%s'\n", yyval.halves.type));
  961.             Debug((stderr, "\tprev = '%s'\n", visible(prev)));
  962.             } break;
  963. case 54:
  964. # line 617 "cdgram.y"
  965. {
  966.             Debug((stderr, "adims: EMPTY\n"));
  967.             arbdims = 1;
  968.             yyval.dynstr = ds("[]");
  969.             } break;
  970. case 55:
  971. # line 624 "cdgram.y"
  972. {
  973.             Debug((stderr, "adims: NUMBER\n"));
  974.             Debug((stderr, "\tNUMBER='%s'\n", yypvt[-0].dynstr));
  975.             arbdims = 0;
  976.             yyval.dynstr = cat(ds("["),yypvt[-0].dynstr,ds("]"),NullCP);
  977.             } break;
  978. case 56:
  979. # line 633 "cdgram.y"
  980. {
  981.             Debug((stderr, "type: tinit c_type\n"));
  982.             Debug((stderr, "\ttinit=''\n"));
  983.             Debug((stderr, "\tc_type='%s'\n", yypvt[-0].dynstr));
  984.             mbcheck();
  985.             yyval.dynstr = yypvt[-0].dynstr;
  986.             } break;
  987. case 57:
  988. # line 643 "cdgram.y"
  989. {
  990.             Debug((stderr, "tinit: EMPTY\n"));
  991.             modbits = 0;
  992.             } break;
  993. case 58:
  994. # line 650 "cdgram.y"
  995. {
  996.             Debug((stderr, "c_type: mod_list\n"));
  997.             Debug((stderr, "\tmod_list='%s'\n", yypvt[-0].dynstr));
  998.             yyval.dynstr = yypvt[-0].dynstr;
  999.             } break;
  1000. case 59:
  1001. # line 657 "cdgram.y"
  1002. {
  1003.             Debug((stderr, "c_type: tname\n"));
  1004.             Debug((stderr, "\ttname='%s'\n", yypvt[-0].dynstr));
  1005.             yyval.dynstr = yypvt[-0].dynstr;
  1006.             } break;
  1007. case 60:
  1008. # line 664 "cdgram.y"
  1009. {
  1010.             Debug((stderr, "c_type: mod_list tname\n"));
  1011.             Debug((stderr, "\tmod_list='%s'\n", yypvt[-1].dynstr));
  1012.             Debug((stderr, "\ttname='%s'\n", yypvt[-0].dynstr));
  1013.             yyval.dynstr = cat(yypvt[-1].dynstr,ds(" "),yypvt[-0].dynstr,NullCP);
  1014.             } break;
  1015. case 61:
  1016. # line 672 "cdgram.y"
  1017. {
  1018.             Debug((stderr, "c_type: StrClaUniEnum NAME\n"));
  1019.             Debug((stderr, "\tStrClaUniEnum='%s'\n", yypvt[-1].dynstr));
  1020.             Debug((stderr, "\tNAME='%s'\n", yypvt[-0].dynstr));
  1021.             yyval.dynstr = cat(yypvt[-1].dynstr,ds(" "),yypvt[-0].dynstr,NullCP);
  1022.             } break;
  1023. case 64:
  1024. # line 683 "cdgram.y"
  1025. {
  1026.             yyval.dynstr = yypvt[-0].dynstr;
  1027.             } break;
  1028. case 66:
  1029. # line 690 "cdgram.y"
  1030. {
  1031.             yyval.dynstr = yypvt[-0].dynstr;
  1032.             } break;
  1033. case 67:
  1034. # line 696 "cdgram.y"
  1035. {
  1036.             Debug((stderr, "tname: INT\n"));
  1037.             Debug((stderr, "\tINT='%s'\n", yypvt[-0].dynstr));
  1038.             modbits |= MB_INT; yyval.dynstr = yypvt[-0].dynstr;
  1039.             } break;
  1040. case 68:
  1041. # line 703 "cdgram.y"
  1042. {
  1043.             Debug((stderr, "tname: CHAR\n"));
  1044.             Debug((stderr, "\tCHAR='%s'\n", yypvt[-0].dynstr));
  1045.             modbits |= MB_CHAR; yyval.dynstr = yypvt[-0].dynstr;
  1046.             } break;
  1047. case 69:
  1048. # line 710 "cdgram.y"
  1049. {
  1050.             Debug((stderr, "tname: FLOAT\n"));
  1051.             Debug((stderr, "\tFLOAT='%s'\n", yypvt[-0].dynstr));
  1052.             modbits |= MB_FLOAT; yyval.dynstr = yypvt[-0].dynstr;
  1053.             } break;
  1054. case 70:
  1055. # line 717 "cdgram.y"
  1056. {
  1057.             Debug((stderr, "tname: DOUBLE\n"));
  1058.             Debug((stderr, "\tDOUBLE='%s'\n", yypvt[-0].dynstr));
  1059.             modbits |= MB_DOUBLE; yyval.dynstr = yypvt[-0].dynstr;
  1060.             } break;
  1061. case 71:
  1062. # line 724 "cdgram.y"
  1063. {
  1064.             Debug((stderr, "tname: VOID\n"));
  1065.             Debug((stderr, "\tVOID='%s'\n", yypvt[-0].dynstr));
  1066.             modbits |= MB_VOID; yyval.dynstr = yypvt[-0].dynstr;
  1067.             } break;
  1068. case 72:
  1069. # line 732 "cdgram.y"
  1070. {
  1071.             Debug((stderr, "mod_list: modifier mod_list1\n"));
  1072.             Debug((stderr, "\tmodifier='%s'\n", yypvt[-1].dynstr));
  1073.             Debug((stderr, "\tmod_list1='%s'\n", yypvt[-0].dynstr));
  1074.             yyval.dynstr = cat(yypvt[-1].dynstr,ds(" "),yypvt[-0].dynstr,NullCP);
  1075.             } break;
  1076. case 73:
  1077. # line 740 "cdgram.y"
  1078. {
  1079.             Debug((stderr, "mod_list: modifier\n"));
  1080.             Debug((stderr, "\tmodifier='%s'\n", yypvt[-0].dynstr));
  1081.             yyval.dynstr = yypvt[-0].dynstr;
  1082.             } break;
  1083. case 74:
  1084. # line 748 "cdgram.y"
  1085. {
  1086.             Debug((stderr, "mod_list1: mod_list\n"));
  1087.             Debug((stderr, "\tmod_list='%s'\n", yypvt[-0].dynstr));
  1088.             yyval.dynstr = yypvt[-0].dynstr;
  1089.             } break;
  1090. case 75:
  1091. # line 755 "cdgram.y"
  1092. {
  1093.             Debug((stderr, "mod_list1: CONSTVOLATILE\n"));
  1094.             Debug((stderr, "\tCONSTVOLATILE='%s'\n", yypvt[-0].dynstr));
  1095.             if (PreANSIFlag)
  1096.                 notsupported(" (Pre-ANSI Compiler)", yypvt[-0].dynstr, NullCP);
  1097.             else if (RitchieFlag)
  1098.                 notsupported(" (Ritchie Compiler)", yypvt[-0].dynstr, NullCP);
  1099.             else if ((strcmp(yypvt[-0].dynstr, "noalias") == 0) && CplusplusFlag)
  1100.                 unsupp(yypvt[-0].dynstr, NullCP);
  1101.             yyval.dynstr = yypvt[-0].dynstr;
  1102.             } break;
  1103. case 76:
  1104. # line 769 "cdgram.y"
  1105. {
  1106.             Debug((stderr, "modifier: UNSIGNED\n"));
  1107.             Debug((stderr, "\tUNSIGNED='%s'\n", yypvt[-0].dynstr));
  1108.             modbits |= MB_UNSIGNED; yyval.dynstr = yypvt[-0].dynstr;
  1109.             } break;
  1110. case 77:
  1111. # line 776 "cdgram.y"
  1112. {
  1113.             Debug((stderr, "modifier: SIGNED\n"));
  1114.             Debug((stderr, "\tSIGNED='%s'\n", yypvt[-0].dynstr));
  1115.             modbits |= MB_SIGNED; yyval.dynstr = yypvt[-0].dynstr;
  1116.             } break;
  1117. case 78:
  1118. # line 783 "cdgram.y"
  1119. {
  1120.             Debug((stderr, "modifier: LONG\n"));
  1121.             Debug((stderr, "\tLONG='%s'\n", yypvt[-0].dynstr));
  1122.             modbits |= MB_LONG; yyval.dynstr = yypvt[-0].dynstr;
  1123.             } break;
  1124. case 79:
  1125. # line 790 "cdgram.y"
  1126. {
  1127.             Debug((stderr, "modifier: SHORT\n"));
  1128.             Debug((stderr, "\tSHORT='%s'\n", yypvt[-0].dynstr));
  1129.             modbits |= MB_SHORT; yyval.dynstr = yypvt[-0].dynstr;
  1130.             } break;
  1131. case 80:
  1132. # line 798 "cdgram.y"
  1133. {
  1134.             Debug((stderr, "opt_constvol_list: CONSTVOLATILE opt_constvol_list\n"));
  1135.             Debug((stderr, "\tCONSTVOLATILE='%s'\n", yypvt[-1].dynstr));
  1136.             Debug((stderr, "\topt_constvol_list='%s'\n", yypvt[-0].dynstr));
  1137.             if (PreANSIFlag)
  1138.                 notsupported(" (Pre-ANSI Compiler)", yypvt[-1].dynstr, NullCP);
  1139.             else if (RitchieFlag)
  1140.                 notsupported(" (Ritchie Compiler)", yypvt[-1].dynstr, NullCP);
  1141.             else if ((strcmp(yypvt[-1].dynstr, "noalias") == 0) && CplusplusFlag)
  1142.                 unsupp(yypvt[-1].dynstr, NullCP);
  1143.             yyval.dynstr = cat(yypvt[-1].dynstr,ds(strlen(yypvt[-0].dynstr) ? " " : ""),yypvt[-0].dynstr,NullCP);
  1144.             } break;
  1145. case 81:
  1146. # line 812 "cdgram.y"
  1147. {
  1148.             Debug((stderr, "opt_constvol_list: EMPTY\n"));
  1149.             yyval.dynstr = ds("");
  1150.             } break;
  1151. case 82:
  1152. # line 819 "cdgram.y"
  1153. {
  1154.             Debug((stderr, "constvol_list: CONSTVOLATILE opt_constvol_list\n"));
  1155.             Debug((stderr, "\tCONSTVOLATILE='%s'\n", yypvt[-1].dynstr));
  1156.             Debug((stderr, "\topt_constvol_list='%s'\n", yypvt[-0].dynstr));
  1157.             if (PreANSIFlag)
  1158.                 notsupported(" (Pre-ANSI Compiler)", yypvt[-1].dynstr, NullCP);
  1159.             else if (RitchieFlag)
  1160.                 notsupported(" (Ritchie Compiler)", yypvt[-1].dynstr, NullCP);
  1161.             else if ((strcmp(yypvt[-1].dynstr, "noalias") == 0) && CplusplusFlag)
  1162.                 unsupp(yypvt[-1].dynstr, NullCP);
  1163.             yyval.dynstr = cat(yypvt[-1].dynstr,ds(strlen(yypvt[-0].dynstr) ? " " : ""),yypvt[-0].dynstr,NullCP);
  1164.             } break;
  1165. case 86:
  1166. # line 837 "cdgram.y"
  1167. {
  1168.             Debug((stderr, "storage: AUTO,EXTERN,STATIC,REGISTER (%s)\n", yypvt[-0].dynstr));
  1169.             yyval.dynstr = yypvt[-0].dynstr;
  1170.             } break;
  1171. case 87:
  1172. # line 844 "cdgram.y"
  1173. {
  1174.             Debug((stderr, "opt_storage: storage=%s\n", yypvt[-0].dynstr));
  1175.             yyval.dynstr = yypvt[-0].dynstr;
  1176.             } break;
  1177. case 88:
  1178. # line 850 "cdgram.y"
  1179. {
  1180.             Debug((stderr, "opt_storage: EMPTY\n"));
  1181.             yyval.dynstr = ds("");
  1182.             } break;
  1183.         }
  1184.         goto yystack;  /* stack new state and value */
  1185.  
  1186.     }
  1187. SHAR_EOF
  1188. cat << \SHAR_EOF > cdlex.l
  1189. %{
  1190. /* Lexical analyzer description for ANSI and C++ cdecl. */
  1191. /* The output of this file is included */
  1192. /* into the C file cdecl.c. */
  1193. char cdlexsccsid[] = "@(#)cdlex.l    2.2 3/30/88";
  1194. %}
  1195.  
  1196. N    [0-9]
  1197. A    [A-Z_a-z]
  1198. AN    [0-9A-Z_a-z]
  1199.  
  1200. %%
  1201. array        return ARRAY;
  1202. as        return AS;
  1203. cast        return CAST;
  1204. declare        return DECLARE;
  1205. exit        return 0;
  1206. explain        return EXPLAIN;
  1207. function    return FUNCTION;
  1208. func        return FUNCTION;
  1209. help        return HELP;
  1210. into        return INTO;
  1211. member        return MEMBER;
  1212. of        return OF;
  1213. pointer        return POINTER;
  1214. ptr        return POINTER;
  1215. quit        return 0;
  1216. reference    return REFERENCE;
  1217. ref        return REFERENCE;
  1218. returning    return RETURNING;
  1219. ret        return RETURNING;
  1220. set        return SET;
  1221. to        return TO;
  1222. vector        return ARRAY;
  1223. ::        return DOUBLECOLON;
  1224. [?]        return HELP;
  1225. [,]        return COMMA;
  1226.  
  1227. auto        { yylval.dynstr = ds(yytext);    return AUTO; }
  1228. character    { yylval.dynstr = ds("char");    return CHAR; }
  1229. char        { yylval.dynstr = ds(yytext);    return CHAR; }
  1230. class        { yylval.dynstr = ds(yytext);    return CLASS; }
  1231. constant    { yylval.dynstr = ds("const");    return CONSTVOLATILE; }
  1232. const        { yylval.dynstr = ds(yytext);    return CONSTVOLATILE; }
  1233. double        { yylval.dynstr = ds(yytext);    return DOUBLE; }
  1234. enumeration    { yylval.dynstr = ds("enum");    return ENUM; }
  1235. enum        { yylval.dynstr = ds(yytext);    return ENUM; }
  1236. extern        { yylval.dynstr = ds(yytext);    return EXTERN; }
  1237. float        { yylval.dynstr = ds(yytext);    return FLOAT; }
  1238. integer        { yylval.dynstr = ds("int");    return INT; }
  1239. int        { yylval.dynstr = ds(yytext);    return INT; }
  1240. long        { yylval.dynstr = ds(yytext);    return LONG; }
  1241. noalias        { yylval.dynstr = ds(yytext);    return CONSTVOLATILE; }
  1242. register    { yylval.dynstr = ds(yytext);    return REGISTER; }
  1243. short        { yylval.dynstr = ds(yytext);    return SHORT; }
  1244. signed        { yylval.dynstr = ds(yytext);    return SIGNED; }
  1245. static        { yylval.dynstr = ds(yytext);    return STATIC; }
  1246. structure    { yylval.dynstr = ds("struct");    return STRUCT; }
  1247. struct        { yylval.dynstr = ds(yytext);    return STRUCT; }
  1248. union        { yylval.dynstr = ds(yytext);    return UNION; }
  1249. unsigned    { yylval.dynstr = ds(yytext);    return UNSIGNED; }
  1250. void        { yylval.dynstr = ds(yytext);    return VOID; }
  1251. volatile    { yylval.dynstr = ds(yytext);    return CONSTVOLATILE; }
  1252.  
  1253. {A}{AN}*    { yylval.dynstr = ds(yytext);    return NAME; }
  1254. {N}+        { yylval.dynstr = ds(yytext);    return NUMBER; }
  1255.  
  1256. [#].*        ;
  1257. [\t ]        ;
  1258. [&*[\]();\n]    return *yytext;
  1259. .        {
  1260.             (void) printf("bad character '%s'\n",visible(*yytext));
  1261.             return *yytext;
  1262.         }
  1263. %%
  1264. SHAR_EOF
  1265. cat << \SHAR_EOF > makefile
  1266. cdecl.o: cdecl.c
  1267.     cc +p -DAMIGA -DNOGETOPT -DNOVARARGS cdecl.c
  1268. cdecl: cdecl.o
  1269.     ln cdecl.o -lcl32
  1270. cdeclsym: cdecl.c
  1271.     cc -n +p -DAMIGA -DNOGETOPT -DNOVARARGS cdecl.c
  1272.     ln -g cdecl.o -lcl32
  1273. SHAR_EOF
  1274. cat << \SHAR_EOF > makefile.old
  1275. # @(#)makefile    2.2 1/20/88
  1276. # the following can be added to CFLAGS for various things
  1277. #
  1278. # add -DNOVOID        If your compiler can not handle the void keyword.
  1279. # add -DBSD        For BSD4.[23] UNIX Systems.
  1280. # add -DDOS        For MS-DOS/PC-DOS Systems, Micro-Soft C 4.0, Turbo C
  1281. #                Use the ANSI option.
  1282. # add -DNOGETOPT    If your library doesn't have getopt().
  1283. #                Another routine will be used in its place.
  1284. # add -DNOVARARGS    If you have neither <stdarg.h> (ANSI C) or
  1285. #                <varargs.h> (pre-ANSI C).
  1286. #                Another method will be compiled instead.
  1287. # add -Ddodebug        To compile in debugging trace statements.
  1288. # add -Ddoyydebug    To compile in yacc trace statements.
  1289.  
  1290. CFLAGS= -g -Ddodebug -Ddoyydebug -DBSD
  1291. CC= cc
  1292. ALLFILES= makefile cdgram.y cdlex.l cdecl.c cdecl.1 testset testset++
  1293. BIN= /usr/lubin
  1294.  
  1295. cdecl: c++decl test
  1296.  
  1297. c++decl: cdgram.c cdlex.c cdecl.c
  1298.     $(CC) $(CFLAGS) -o cdecl cdecl.c
  1299.     -ln cdecl c++decl
  1300.  
  1301. cdlex.c: cdlex.l
  1302.     lex cdlex.l && mv lex.yy.c cdlex.c
  1303.  
  1304. cdgram.c: cdgram.y
  1305.     yacc cdgram.y && mv y.tab.c cdgram.c
  1306.  
  1307. test:
  1308.     ./cdecl < testset
  1309.     ./c++decl < testset++
  1310.  
  1311. install: c++decl
  1312.     mv cdecl $(BIN)/cdecl
  1313.     ln $(BIN)/cdecl $(BIN)/c++decl
  1314.  
  1315. clean:
  1316.     rm -f cdgram.c cdlex.c cdecl y.output c++decl
  1317.  
  1318. clobber: clean
  1319.     rm -f $(BIN)/cdecl $(BIN)/c++decl
  1320.  
  1321. cdecl.cpio: $(ALLFILES)
  1322.     ls $(ALLFILES) | cpio -ocv > cdecl.cpio
  1323.  
  1324. cdecl.shar: $(ALLFILES)
  1325.     shar $(ALLFILES) > cdecl.shar
  1326. SHAR_EOF
  1327. cat << \SHAR_EOF > string.h
  1328. char *strcat(), *strncat(), *strcpy(), *strncpy(), index(), rindex();
  1329. char *strchr(), *strrchr(), *strpbrk(), *strtok();
  1330. int strcmp(), strncmp(), strlen(), strspn(), strcspn();
  1331. SHAR_EOF
  1332. cat << \SHAR_EOF > testset
  1333. help
  1334. set options
  1335. # test some declarations
  1336. declare x as ptr to character
  1337. declare x as func(w as ptr to char, y as int) ret ptr to int
  1338. declare x as func(ptr to char) ret ptr to int
  1339. declare x as func(int) ret ptr to int
  1340. declare x as func(ptr to char, int) ret ptr to int
  1341. declare x as function (args) returning pointer to int
  1342. # test some explain functions
  1343. explain char *x
  1344. explain int *x()
  1345. explain int *x(args)
  1346. explain int *x(char *)
  1347. explain int *x(char *, int )
  1348. explain int *x(char *, int, float)
  1349. explain int *x(int )
  1350. # test some casts
  1351. cast x into ptr to char
  1352. cast x into ptr to func ret int
  1353. cast x into ptr to func() ret int
  1354. cast x into ptr to func(args) ret int
  1355. cast x into ptr to func(x as ptr to char, y as int) ret int
  1356. cast x into ptr to func(ptr to char) ret int
  1357. cast x into ptr to func(ptr to char, int) ret int
  1358. cast x into ptr to func(ptr to char, int, float) ret int
  1359. # test explaining some casts
  1360. explain (char *)x
  1361. explain (int (*)())x
  1362. explain (int (*)(char *))x
  1363. explain (int (*)(char *, int))x
  1364. explain (int (*)(char *, int, float))x
  1365. SHAR_EOF
  1366. cat << \SHAR_EOF > testset++
  1367. help
  1368. set options
  1369. # test some declarations
  1370. declare x as ptr to character
  1371. declare x as reference to character
  1372. declare foo as pointer to member of class X int
  1373. declare foo as pointer to member of class X function (arg1, arg2) returning pointer to class Y
  1374. declare x as func(w as ptr to char, y as int) ret ptr to int
  1375. declare x as func(ptr to char) ret ptr to int
  1376. declare x as func(int) ret ptr to int
  1377. declare x as func(ptr to char, int) ret ptr to int
  1378. declare x as function (args) returning pointer to int
  1379. # test some explain functions
  1380. explain char *x
  1381. explain int X::*foo
  1382. explain class Y *(X::*foo)(arg1, arg2)
  1383. explain int *x()
  1384. explain int *x(args)
  1385. explain int *x(char *)
  1386. explain int *x(char *, int )
  1387. explain int *x(char *, int, float)
  1388. explain int *x(int )
  1389. # test some casts
  1390. cast x into ptr to char
  1391. cast x into ptr to member of class X int
  1392. cast x into ptr to func ret int
  1393. cast x into ptr to func() ret int
  1394. cast x into ptr to func(args) ret int
  1395. cast x into ptr to func(x as ptr to char, y as int) ret int
  1396. cast x into ptr to func(ptr to char) ret int
  1397. cast x into ptr to func(ptr to char, int) ret int
  1398. cast x into ptr to func(ptr to char, int, float) ret int
  1399. # test explaining some casts
  1400. explain (char *)x
  1401. explain (int X::*)x
  1402. explain (int (*)())x
  1403. explain (int (*)(char *))x
  1404. explain (int (*)(char *, int))x
  1405. explain (int (*)(char *, int, float))x
  1406. SHAR_EOF
  1407. #    End of shell archive
  1408. exit 0
  1409. -- 
  1410. Bob Page, U of Lowell CS Dept.  page@swan.ulowell.edu  ulowell!page
  1411. Have five nice days.
  1412.